﻿using mars_server.csharp.CO;
using mars_server.csharp.model;
using mars_server.csharp.socket;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace mars_server.csharp.AO
{
    public interface UserSocketAO
    {
        /***
         * 通过UserDO来删除UserSocket cache中的用户
         * */
         void deleteUserSocketByUserDO(UserDO userDO);


        /***
         * 通过UserSocket来删除UserSocketCache中的用户
         * */
        void deleteUserSocketByUserSocket(UserSocket userSocket);


        List<UserDO> queryOnlineUserDO();


        //void sendMessageToAll();


        //void sendMessageToUserList();


        void sendMessageToUser(UserDO userDO,MessageCO messageCO);

        void sendMessageToSocket(UserSocket userSocket, MessageCO messageCO);

        bool isUserOnlie(long userId);
    }
}
